Skip to content

Show all overloads in QuickInfo for overloaded CE custom operators#19865

Open
T-Gro wants to merge 4 commits into
mainfrom
fix/issue-11612
Open

Show all overloads in QuickInfo for overloaded CE custom operators#19865
T-Gro wants to merge 4 commits into
mainfrom
fix/issue-11612

Conversation

@T-Gro
Copy link
Copy Markdown
Member

@T-Gro T-Gro commented May 29, 2026

Summary

Fixes #11612

When hovering over an overloaded [] keyword in a computation expression, QuickInfo now shows all overloads instead of only the last one.

Changes

  • CheckComputationExpressions.fs/fsi: Expose helper to collect sibling custom-operation methods from the builder type.
  • ServiceDeclarationLists.fs: Aggregate all overloads when rendering \Item.CustomOperation\ tooltips; place the resolved overload first and append distinguishing parameter types when there are multiple overloads.
  • TooltipTests.fs: Add FCS tests verifying the tooltip content for both single and overloaded CE custom operators.
  • Release notes: Entry added to \docs/release-notes/.FSharp.Compiler.Service/9.0.300.md.

Testing

  • New tooltip tests confirm all overloads appear and the resolved one is listed first.
  • Existing CE tests continue to pass.

Copilot and others added 2 commits May 29, 2026 18:22
)

Captures issue #11612: when a CE builder defines multiple [<CustomOperation>] overloads, FCS GetToolTip always returns the generic 'custom operation: NAME (bool)' description from the last registered overload rather than the resolved overload's parameter types.

Current failures (RED):

- CE custom operator QuickInfo shows resolved overload: tooltip is 'custom operation: whereOp (bool)\nCalls Builder.Wh...' - missing 'int' from resolved WhereInt overload

- CE custom operator with three overloads shows resolved float overload: tooltip is 'custom operation: filterOp (bool)\nCalls Builder.F...' - missing 'float'

- GetSymbolUse resolves correct CE operator overload: tooltip is 'custom operation: pickOne (bool)\nCalls Builder.Pi...' - missing 'int'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…11612)

Aggregate sibling [<CustomOperation>] methods on the builder type when rendering Item.CustomOperation tooltips, placing the resolved overload first. When there is more than one overload, also append the first parameter's type so that distinct overloads are visibly distinguished. Fixes #11612.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@brianrourkeboll brianrourkeboll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why show all of them instead of the resolved overload? (#15206 (comment))

In my opinion, the behavior would ideally be the same for overloaded custom operations as it is for overloaded methods.

let result = b { for x in [1.0;2.0] do filterO{caret}p (x > 0.0) }
"""
|> renderAllGroups
|> fun text -> Assert.Contains("float", text)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we dump all the overloads instead?

@github-actions github-actions Bot added the AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

QuickInfo for overloaded custom CE operator does not show info for specific resolved method

3 participants